#页面类
from ykmn2.Page.Page import Page
from selenium.webdriver.common.by import By
from time import sleep

class Page1(Page):
    #定位器
    email_click_loc=(By.XPATH,'//*[@id="addSkinClass"]/div[4]/div/ul/li[1]')
    people_loc=(By.CLASS_NAME,'drct-mail-addrs ng-isolate-scope')
    subject_loc=(By.XPATH,'//*[@id="mailContent"]/div/div[1]/div[1]/div[4]')
    send_loc=(By.XPATH,'//*[@id="mailContent"]/div/div[2]/span[1]')
    #页面元素封装
    def email_click(self):
        self.click(self.email_click_loc)
    def people(self):
        self.send_keys(self.people_loc,'梨花')
    def subject(self):
        self.send_keys(self.subject_loc,'邮件内容')
    def send(self):
        self.click(self.send_loc)
